#字符串的处理
my_str = "itheima itcast boxuegu"
count = my_str.count("it")
print(count)
new_str = my_str.replace(" ","|")
print(new_str)
new_str_list = new_str.split("|")
print(new_str_list)

str2 = "   itheima itcast boxuegu   "
new_str2 = str2.strip()
print(new_str2)

# 序列切片的实现
str = "月薪过万，员序程马黑来，nohtyP学"
# 方法1
index = str.index("员")
print(index)
new_str = str[5:10]
result1 = new_str[::-1]
print(result1)
# 方法2
str2_list = str.split("，")
str3 = str2_list[1].replace("来"," ")
result2 = str3[::-1]
print(result2)
